import $axios from '../index.js'

// 文件列表
function attachmentList(data) {
  const url = '/attachment/index'
  return $axios.get(url, data)
}
// 文件添加
function attachmentSave(data) {
  const url = '/attachment/save'
  return $axios.post(url, data)
}
// 文件详情
function attachmentInfo(data) {
  const url = '/attachment/read'
  return $axios.get(url, data)
}
// 文件编辑
function attachmentUpdate(data) {
  const url = '/attachment/update'
  return $axios.post(url, data)
}
// 文件删除
function attachmentDelete(data) {
  const url = '/attachment/delete'
  return $axios.post(url, data)
}

// 文件类别列表
function cateList(data) {
  const url = '/attachmentCate/index'
  return $axios.get(url, data)
}
// 文件类别添加
function cateSave(data) {
  const url = '/attachmentCate/save'
  return $axios.post(url, data)
}
// 文件类别详情
function cateInfo(data) {
  const url = '/attachmentCate/read'
  return $axios.get(url, data)
}
// 文件类别编辑
function cateUpdate(data) {
  const url = '/attachmentCate/update'
  return $axios.post(url, data)
}
// 文件类别删除
function cateDelete(data) {
  const url = '/attachmentCate/delete'
  return $axios.post(url, data)
}
// 文件修改地址
function editFileUrl(data) {
  const url = '/attachment/editFileUrl'
  return $axios.post(url, data)
}
export default {
  attachmentList,
  attachmentSave,
  attachmentInfo,
  attachmentUpdate,
  attachmentDelete,
  cateList,
  cateSave,
  cateInfo,
  cateUpdate,
  editFileUrl,
  cateDelete
}
